<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page isELIgnored="false"%>
<html>
<head>
<link href="resource/bootstrap-3.3.0/css/bootstrap.min.css"
	rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="container">
		<ul class="nav nav-pills">
			<li role="presentation"><a href="ShowCheckShop">Check</a></li>
			<li role="presentation" class="active"><a href="ShowManageShop">Managerment</a></li>
		</ul>
	</div>
	<div class="container">
		<table class="table">
			<tr>
				<td>ShopName</td>
				<td>ShopNumber</td>
				<td>LegalName</td>
				<td>IdNumber</td>
				<td>Phone</td>
				<td>Address</td>
				<td>SignTime</td>
				<td>Describe</td>
				<td>Available</td>
				<td>BLACK/WHITE</td>
			</tr>
			<c:forEach var="shop" items="${shops}" begin="${begin}" end="${end}" varStatus="status">
				<tr>
					<td>${shop.shopName}</td>
					<td>${shop.shopNumber}</td>
					<td>${shop.legalName}</td>
					<td>${shop.idNumber}</td>
					<td>${shop.sPhone}</td>
					<td>${shop.address}</td>
					<td>${shop.signTime}</td>
					<td>${shop.describe}</td>
					<c:if test="${shop.available == 1}">
						<td>White</td>
					</c:if>
					<c:if test="${shop.available == -2}">
						<td>Black</td>
					</c:if>
					<c:choose>
						<c:when test="${shop.available == 1}">
							<td><a class="btn btn-primary btn-xs"
								href="ToBlackShop?shopId=${shop.shopId}&&index=${status.index}" role="button">ToBlack</a></td>
						</c:when>
						<c:when test="${shop.available == -2}">
							<td><a class="btn btn-warning btn-xs"
								href="ToWhiteShop?shopId=${shop.shopId}&&index=${status.index}" role="button">ToWhite</a></td>
						</c:when>
					</c:choose>
				</tr>
			</c:forEach>
		</table>
	</div>
	<div class="container">
		<ul class="pagination">
			<c:forEach var="num" items="${pagingNum}">
				<li><a href="Paging?num=${num}">${num}</a></li>
			</c:forEach>
		</ul>
	</div>
</body>
</html>
